﻿// ----------------------------------------------------------------------
//
// <copyright file="Version.cs" company="TheAcidToy Inc" Date="2012">
//     TheAcidToy is a registered trademark of TheAcidToy Inc. All right reserved, copywrited: 2012
// </copyright>
//
// ------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Reflection;

    public class Version
    {
        public static string get_Ver()
        {
            Assembly ass = Assembly.GetExecutingAssembly();
            string version;
            if (ass != null)
            {
                FileVersionInfo FVI = FileVersionInfo.GetVersionInfo(ass.Location);
                version = String.Format("{0} Version ({1:0}.{2:0}.{3:0})", FVI.ProductName, FVI.FileMajorPart.ToString(), FVI.FileMinorPart.ToString(), FVI.FileBuildPart.ToString());
            }
            else
            {
                version = "Unknown";
            }
            return version;
        }
    }
